home *** CD-ROM | disk | FTP | other *** search
/ PC-X 1997 October / pcx14_9710.iso / swag / misc.swg / 0199_Doing the Macarena.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1997-05-30  |  1.3 KB  |  50 lines

  1.  
  2. program Macarena;
  3. {
  4.  Programmed by: Jonas Emil M. Enriquez (jeme@gsilink.com)
  5.  Based from the text graphics of Buhrnheim (buhrn@DADOSNET.COM.BR)
  6. }
  7. uses crt,dos;
  8. type STR03 = STRING[3];
  9. const Dance : array[1..3,1..16] of STR03 =
  10.     ((' o ', ' o ', ' o ', ' o ', ' o ', ' o ', '<o ', '<o>', ' o>', ' o ', ' o ', ' o ', ' o ', ' o ', ' o ', ' o '),
  11.      ('^|\', '^|^', 'v|^', 'v|v', '|/v', '|X|', ' \|', ' | ', ' \ ', ' x ', '</ ', '<|>', '</>', '<\>', '<)>', ' |\'),
  12.      (' /\', ' >\', '/< ', ' >\', '/< ', ' >\', '/< ', ' >\', '/< ', ' >\', '/< ', ' >\', '/< ', ' >\', ' >>', ' L '));
  13.  
  14. var x : byte;
  15.     Reg : registers;
  16.  
  17. procedure Norm_Cursor;
  18.   begin
  19.     Reg.AH := $01;
  20.     Reg.CH := $06;
  21.     Reg.CL := $07;
  22.     intr($10, Dos.registers(Reg));
  23.   end;
  24.  
  25. procedure Cursor_Off;
  26.   begin
  27.     Reg.AH := $01;
  28.     Reg.CH := $0F;
  29.     Reg.CL := $00;
  30.     intr($10, Dos.registers(Reg));
  31.   end;
  32.  
  33. begin
  34.   Clrscr;
  35.   Cursor_Off;
  36.   GotoXY(27,14); Write('Mr. Ascii dancing Macarena...');
  37.   repeat
  38.     x := 1;
  39.     repeat
  40.       GotoXY(39,10); Write(Dance[1,x]);
  41.       GotoXY(39,11); Write(Dance[2,x]);
  42.       GotoXY(39,12); Write(Dance[3,x]);
  43.       Delay(500);
  44.       x := x + 1;
  45.     until keypressed or (x>16);
  46.   until keypressed;
  47.   Norm_Cursor;
  48. end.
  49.  
  50.